package com.wlscale.roadsystem.modular.setting;

import android.view.View;
import android.widget.Button;

import com.easy.component.component.header.EasyHeaderBuilder;
import com.wlscale.roadsystem.R;
import com.wlscale.roadsystem.base.LZBaseActivity;
import com.wlscale.roadsystem.wiget.AlterRlterRemoteDstAddressAlertDialog;
import com.wlscale.roadsystem.wiget.ChoiceTimeAlertDialog;
import com.wlscale.roadsystem.wiget.LocalZigbeeInfoAlertDialog;

/**
 * 出厂调教
 */
public class ParameterSettingActivtiy extends LZBaseActivity implements View.OnClickListener {
    /**
     *
     */
    private EasyHeaderBuilder easyHeaderBuilder;
    /**
     * 编辑本地ZigBee信息
     */
    private Button btn_query_local_zigbee_info;
    /**
     * 修改远程ZigBee目的地址
     */
    private Button btn_set_remote_zigbee_address;

    @Override
    public void initlayoutResID() {
        setContentView(R.layout.activity_par_set);
    }

    @Override
    public void initBundle() {

    }

    @Override
    public void initView() {
        btn_query_local_zigbee_info = findViewById(R.id.btn_query_local_zigbee_info);
        btn_set_remote_zigbee_address = findViewById(R.id.btn_set_remote_zigbee_address);
        btn_query_local_zigbee_info.setOnClickListener(this);
        btn_set_remote_zigbee_address.setOnClickListener(this);
    }

    @Override
    public void initHeader() {
        easyHeaderBuilder = new EasyHeaderBuilder(this);
        easyHeaderBuilder.addLeftImageBackView();
        easyHeaderBuilder.setTitle("出厂调教");
        easyHeaderBuilder.addLeftImageBackListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finishActivity();
            }
        });
    }

    @Override
    public void initLoadingView() {

    }

    @Override
    public void initData() {

    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.btn_query_local_zigbee_info:
                LocalZigbeeInfoAlertDialog localZigbeeInfoAlertDialog = new LocalZigbeeInfoAlertDialog.Builder().setContext(this).setTitle("编辑本地ZigBee模块的信息")
                        .setLeftText("刷新").setRigthText("确定")
                        .setOnClickLister(new LocalZigbeeInfoAlertDialog.OnClickLister() {

                            @Override
                            public void onClickLister(String locAddress) {

                            }
                        }).builder();
                localZigbeeInfoAlertDialog.show();
                break;
            case R.id.btn_set_remote_zigbee_address:
                AlterRlterRemoteDstAddressAlertDialog alterRlterRemoteDstAddressAlertDialog = new AlterRlterRemoteDstAddressAlertDialog.Builder().setContext(this).setTitle("修改远程ZigBee目的地址:")
                        .setLeftText("确定").setRigthText("取消")
                        .setOnClickLister(new AlterRlterRemoteDstAddressAlertDialog.OnClickLister() {

                            @Override
                            public void onClickLister(String locAddress) {

                            }
                        }).builder();
                alterRlterRemoteDstAddressAlertDialog.show();
                break;
        }
    }
}
